package ZuoYe4_forXunHuan_0421;

import java.util.Scanner;

public class ZuoYe9_HuiWenShu {

	public static void main(String[] args) {
		// 9:输入一个整数，判断其是否是回文数，回文数是指这个数颠倒后，和原数相同那个。
		Scanner input = new Scanner(System.in);
		System.out.println("请输入一个正整数:");
		int num = input.nextInt();
		int a = 0, b = num;
		for (; num > 0; num /= 10) {

			a = a * 10 + num % 10;
		}
		if (a == b) {
			System.out.println(b + "是回文数");
		} else {
			System.out.println(b + "不是回文数");
		}
	}

}
